import PostShow from "@/components/posts/post-show";
import { Suspense } from "react";
import PostShowLoading from "@/components/posts/post-show-loading"; 
import CommentCreateForm from "@/components/comments/comment-create-form";
import CommentList from "@/components/comments/comment-list";
interface PostShowPageProps {
  params: Promise<{
    name: string;
    postId: string;
  }>;
}

export default async function PostShowPage({ params }: PostShowPageProps) {
  const {  postId } = await params;
  return (
    <div className="space-y-3">
      <Suspense fallback={<PostShowLoading />}>
        <PostShow postId={postId}></PostShow>
      </Suspense>
      <CommentCreateForm postId={postId} isOpen={true} />
      <CommentList postId={postId}></CommentList>
    </div>
  );
}
